<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"
        />
        <title>
            <?php echo C('STIE_NAME') ?>
        </title>
        <link rel="stylesheet" href="/self_lx/3-28/Bbs/Public/layui/css/layui.css"
        />
        <link rel="stylesheet" href="/self_lx/3-28/Bbs/Public/css/global.css"
        />
       <link rel="stylesheet" href="/self_lx/3-28/Bbs/Public/css/font_aw93q7mhbm7k3xr.css"
        />
        <script type="text/javascript" src="/self_lx/3-28/Bbs/Public/layui/layui.js"></script>
    </head>
    
    <body>
        <div class="header">
            <div class="main">
                <a class="logo" href="/self_lx/3-28/Bbs" title="Fly">
                    Fly社区
                </a>
                <div class="nav">
                    <a href="<?php echo U('home/index/all');?>">
                        <i class="iconfont icon-wenda">
                        </i>
                        讨论
                    </a>
                    <a href="">
                        <i class="iconfont icon-iconmingxinganli" style="top: 2px;">
                        </i>
                        案例
                    </a>
                    <a href="">
                        <i class="iconfont icon-ui">
                        </i>
                        框架
                    </a>
                </div>
    <?php if (isset($_SESSION['id'])) { ?>
        <div class="nav-user">
    <a class="avatar" href="<?php echo U('home/U/index');?>">
        <img src="/self_lx/3-28/Bbs/<?php echo $_SESSION['face'] ?>">
        <cite>
           <?php echo $_SESSION['nickname'] ?>
        </cite>
    </a>
    <div class="nav">
        <a href="<?php echo U('home/U/edit');?>">
            <i class="iconfont icon-shezhi">
            </i>
            设置
        </a>
        <a href="<?php echo U('home/login/loginout');?>">
            <i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;">
            </i>
            退了
        </a>
    </div>
</div>
       <?php }else{ ?>
                <div class="nav-user">
                    <a class="unlogin" href="<?php echo U('home/login/index');?>">
                        <i class="iconfont icon-touxiang">
                        </i>
                    </a>
                    <span>
                        <a href="<?php echo U('home/login/index');?>">
                            登入
                        </a>
                        <a href="<?php echo U('home/reg/index');?>">
                            注册
                        </a>
                    </span>
                    <p class="out-login">
                        <a href="<?php echo U('home/login/qqlogin');?>" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-qq" title="QQ登入">
                        </a>
                        <a href="http://fly.layui.com:8098/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-weibo" title="微博登入">
                        </a>
                    </p>
                </div>
                 <?php } ?>
            </div>
           
        </div>




                <div class="main layui-clear">
    <div class="wrap">
        <div class="content">
            <div class="fly-tab fly-tab-index">
                <span>
                    <a href="<?php echo U('home/index/all');?>" class="tab-this">
                        全部
                    </a>
                    <a href="<?php echo U('home/index/unfinish');?>">
                        未结帖
                    </a>
                    <a href="<?php echo U('home/index/finish');?>">
                        已采纳
                    </a>
                    <a href="<?php echo U('home/index/jin');?>">
                        精帖
                    </a>
                    <a href="<?php echo U('home/u/index');?>">
                        我的帖
                    </a>
                </span>
                <form action="<?php echo U('home/jie/so');?>" class="fly-search">
                    <i class="iconfont icon-sousuo">
                    </i>
                    <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转"
                    name="q" type="text">
                </form>
                <a href="<?php echo U('home/jie/add');?>" class="layui-btn jie-add">
                    发表新帖
                </a>
            </div>
            <ul class="fly-panel fly-list fly-list-top">
            <?php foreach ($tips as $tip) { ?>
                <?php if (in_array('1', explode(',', $tip['tip']))) {?>
            
             <li class="fly-list-li">
                    <a href="{:U('home/u/main',array('id'=>$tip['uid']))}" class="fly-list-avatar">
                        <img src="/self_lx/3-28/Bbs/<?php echo $tip['face'] ?>" alt="贤心">
                    </a>

                    <h2 class="fly-tip">
                        <a href="<?php echo U('home/jie/index',array('id'=>$tip['id']));?>">
                           <?php echo $tip['title'] ?>
                        </a>
                        
                            
                      
                        <span class="fly-tip-stick">
                            置顶
                        </span>
                         <?php if (in_array('2', explode(',', $tip['tip']))) {?>
                        <span class="fly-tip-jing">
                            精帖
                        </span>
                        <?php } ?>
                       
                       
                    </h2>
                    <p>
                        <span>
                            <a href="<?php echo U('home/u/main',array('id'=>$tip['uid']));?>">
                               <?php echo $tip['nickname'] ?>
                            </a>
                        </span>
                        <span>
                            <?php echo CT($tip['create_time']) ?>
                        </span>
                        <span>
                           <?php echo $tip['cname'] ?>
                        </span>
                        <span class="fly-list-hint">
                            <i class="iconfont" title="回答">
                                
                            </i>
                            <?php echo $tip['answer_num'] ?>
                            <i class="iconfont" title="人气">
                                
                            </i>
                            <?php echo $tip['view_num'] ?>
                        </span>
                    </p>
                </li>
                <?php } ?>
                 <?php } ?>
            </ul>
            <!-- 列表开始 -->
           
              
            <ul class="fly-panel fly-list">
                 <?php foreach ($questions as $v) { ?>
                <li class="fly-list-li">
                    <a href="<?php echo U('home/u/main',array('id'=>$v['uid']));?>" class="fly-list-avatar">
                        <img src="/self_lx/3-28/Bbs/<?php echo $v['face'] ?>"
                        alt="冬天">
                    </a>
                    <h2 class="fly-tip">
                        <a href="<?php echo U('home/jie/index',array('id'=>$v['id']));?>">
                           <?php echo htmlspecialchars_decode($v['title']) ?>
                        </a>
                    </h2>
                    <p>
                        <span>
                            <a href="<?php echo U('home/u/main',array('id'=>$tip['uid']));?>">
                                <?php echo $v['nickname']; ?>
                            </a>
                        </span>
                        <span>
                           <?php  echo CT($v['create_time']) ?>
                        </span>
                        <span>
                            layui
                        </span>
                        <span class="fly-list-hint">
                            <i class="iconfont" title="回答">
                                
                            </i>
                           <?php echo $v['answer_num'] ?>
                            <i class="iconfont" title="人气">
                                
                            </i>
                            <?php echo $v['view_num'] ?>
                        </span>
                    </p>
                </li>
            <?php } ?>
            </ul>
             <style type="text/css">
                .laypage-main{
                    border: 0px solid #000;
                }
                .laypage-main div{
                    border: 0px solid #000;
                }
                .laypage-main a{
                    margin-left: 10px;
                    border: 1px solid #009E94;
                }

                .laypage-main span{
                    margin-left: 10px;
                    border: 1px solid #009E94;
                    background: #009E94 url() 0 0 no-repeat;
                    color: #fff;
                }

            </style>
            <div style="text-align: center">
                <div class="laypage-main">
                    <?php echo $page ?>
                </div>
            </div>
        </div>
    </div>
    <div class="edge">
        <div class="fly-panel leifeng-rank">
            <h3 class="fly-panel-title">
                近一月回答榜 - TOP 12
            </h3>
            <dl>
            <?php foreach ($hotUser as $user) { ?>
               
            
                <dd>
                    <a href="<?php echo U('home/u/main',array('id'=>$user['id']));?>">
                        <img src="/self_lx/3-28/Bbs/<?php echo $user['face'] ?>">
                        <cite>
                            <?php echo $user['nickname'] ?>
                        </cite>
                        <i>
                            <?php echo $user['answer_num'] ?>
                        </i>
                    </a>
                </dd>
            <?php } ?>
            </dl>
        </div>
        <dl class="fly-panel fly-list-one">
             <dt class="fly-panel-title">
                最近热帖
            </dt>
            <?php foreach ($hotView as $hotv) { ?> 
            <dd>
                 <a href="<?php echo U('home/jie/index',array('id'=>$hotv['id']));?>">
                    <?php echo $hotv['title'] ?>
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    <?php echo $hotv['view_num'] ?>
                </span>
            </dd>
            <?php } ?>

        </dl>
        <dl class="fly-panel fly-list-one">
             <dt class="fly-panel-title">
                近期热议
            </dt>
            <?php foreach ($hotAnswer as $hota) { ?>
               
           
            <dd>
                <a href="<?php echo U('home/jie/index',array('id'=>$hota['id']));?>">
                    <?php echo $hota['title'] ?>
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    <?php echo $hota['answer_num'] ?>
                </span>
            </dd>
            <?php } ?>
        </dl>
        <div class="fly-panel fly-link">
            <h3 class="fly-panel-title">
                友情链接
            </h3>
            <dl>
                <dd>
                    <a href="http://layim.layui.com/" target="_blank">
                        LayIM
                    </a>
                </dd>
                <dd>
        </div>
        <div class="fly-panel">
            <script type="text/javascript">
                /*336*280*/
                var cpro_id = "u2482656";
            </script>
            <script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/c.js">
            </script>
        </div>
    </div>
</div>


            <div class="footer">
            <p>
                <a href="/self_lx/3-28/Bbs/">
                    Fly社区
                </a>
                2017 &copy;
                <a href="http://www.layui.com/">
                    layui.com
                </a>
            </p>
            <p>
                <a href="http://fly.layui.com/jie/3147.html" target="_blank">
                    产品授权
                </a>
                <a href="http://fly.layui.com/jie/8157.html" target="_blank">
                    获取Fly社区模版
                </a>
                <a href="http://fly.layui.com/jie/2461.html" target="_blank">
                    微信公众号
                </a>
            </p>
        </div>      
        
      
        <span id="cnzz_stat_icon_30088308">
        </span>
        
        <ul class="fly-rbar">
            <li class="iconfont icon-huizongzuoyoutuodong" method="stretch">
            </li>
            <li id="F_topbar" class="iconfont icon-top" method="top" style="display: none;">
            </li>
        </ul>
    </body>

</html>